package org.learn.langchain.langchain4jlearn.controller;

import io.swagger.v3.oas.annotations.tags.Tag;
import org.learn.langchain.langchain4jlearn.service.ConsultantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hzy
 * @Description:
 */
@Tag(name = "Chat", description = "对话相关接口")
@RestController
public class ChatController {
    @Autowired
    private ConsultantService consultantService;

    @PostMapping("/chat")
    public String chat(String msg) {
        return consultantService.chat(msg);
    }
}
